package com.ruoyi.system.domain.bo;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 领取优惠券记录业务对象 p_ask_coupon_log
 *
 * @author ruoyi
 * @date 2022-07-29
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("领取优惠券记录业务对象")
public class PAskCouponLogBo extends BaseEntity {

    /**
     * id
     */
    @ApiModelProperty(value = "id", required = true)
    @NotNull(message = "id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 优惠券发布id
     */
    @ApiModelProperty(value = "优惠券发布id", required = true)
    @NotNull(message = "优惠券发布id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long couponId;

    /**
     * 兑换的项目id
     */
    @ApiModelProperty(value = "兑换的项目id", required = true)
    @NotNull(message = "兑换的项目id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long cid;

    /**
     * 领取人id
     */
    @ApiModelProperty(value = "领取人id", required = true)
    @NotNull(message = "领取人id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long uid;

    /**
     * 优惠券名称
     */
    @ApiModelProperty(value = "优惠券名称", required = true)
    @NotBlank(message = "优惠券名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 优惠券的面值
     */
    @ApiModelProperty(value = "优惠券的面值", required = true)
    @NotNull(message = "优惠券的面值不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal money;

    /**
     * 最低消费多少金额可用优惠券
     */
    @ApiModelProperty(value = "最低消费多少金额可用优惠券", required = true)
    @NotNull(message = "最低消费多少金额可用优惠券不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal minPrice;

    /**
     * 获取方式，send后台发放, 用户领取 get
     */
    @ApiModelProperty(value = "获取方式，send后台发放, 用户领取 get", required = true)
    @NotBlank(message = "获取方式，send后台发放, 用户领取 get不能为空", groups = { AddGroup.class, EditGroup.class })
    private String type;

    /**
     * 状态（0：未使用，1：已使用, 2:已失效）
     */
    @ApiModelProperty(value = "状态（0：未使用，1：已使用, 2:已失效）", required = true)
    @NotNull(message = "状态（0：未使用，1：已使用, 2:已失效）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;

    /**
     * 开始使用时间
     */
    @ApiModelProperty(value = "开始使用时间", required = true)
    @NotNull(message = "开始使用时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date startTime;

    /**
     * 过期时间
     */
    @ApiModelProperty(value = "过期时间", required = true)
    @NotNull(message = "过期时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date endTime;

    /**
     * 使用时间
     */
    @ApiModelProperty(value = "使用时间", required = true)
    @NotNull(message = "使用时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date useTime;

    /**
     * 使用类型 0 全场通用, 1 商品券, 2 咨询券
     */
    @ApiModelProperty(value = "使用类型 0 全场通用, 1 商品券, 2 咨询券", required = true)
    @NotNull(message = "使用类型 0 全场通用, 1 商品券, 2 咨询券", groups = { AddGroup.class, EditGroup.class })
    private Integer useType;

    /**
     * 订单id
     */
    @ApiModelProperty(value = "订单id", required = true)
    @NotNull(message = "订单id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long primaryKey;


}
